//
// Created by guoshunw on 23-12-16.
//

#include "CivetServer.h"
#include "glog/logging.h"

int start_server() {
    // see: https://github.com/civetweb/civetweb/blob/master/src/CivetServer.cpp
    // api: https://github.com/civetweb/civetweb/blob/master/docs/APIReference.md
    auto port = "8888";
    auto webroot = "/opt";

    CivetServer server({
            "document_root",
            webroot,//.listening_ports = "8080",
            "listening_ports",
            port,
    });
    LOG(INFO) << "Server root at " << webroot << " has started on ports: " << port;
    //    auto serverCtx = server.getContext();
    getchar();

    return 0;
}